<template>
	<div class="dcmview_main">
		<iframe :src="iframeSrc" v-if="iframeSrc" class="detail_main_iframe"></iframe>
	</div>
</template>

<script>
	import { genKey } from '@/api/case.js'
	export default {
		name: 'dcmviewmain',
		props: {
			stuuid: {
				type: String,
				default: ''
			},
			isSimplify: {
				type: Boolean,
				default: true
			},
		},
		data() {
			return {
				iframeSrc: ''
			}
		},
		created() {
			this.getSrc()
		},
		methods: {
			getSrc() {
				genKey().then(res => {
					if(res.code == 200) {
						var iframeSrc = this.basedcm + '?study=' + this.stuuid + '&' + res.data
						if(this.isSimplify) {
							iframeSrc += '&isSimplify=' + this.isSimplify
						}
						this.iframeSrc = iframeSrc
					}
				})
			},
		}
	}
</script>
<style type="text/css">
	.dcmview_main {
		width: 100%;
		height: 100%;
		overflow: hidden;
		background: #000000;
	}
	
	.detail_main_iframe {
		width: 100%;
		height: 100%;
		overflow: hidden;
		float: left;
		border: none;
		outline: none;
		background: #212529;
	}
</style>